<template>
	<div>
		<el-row class="bg">
			<el-col :span="8" style="height: 700;">
				<div class="pedcBg">
					<div>PEDCA配置数据</div>
					<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
						<el-tab-pane label="ETH-SIG" name="ETH-SIG">
							<PEDCForm :dataForm="dataForm1" :pedca="activeName"></PEDCForm>
						</el-tab-pane>
						<el-tab-pane label="ETH-TIAS" name="ETH-TIAS">
							<PEDCForm :dataForm="dataForm1" :pedca="activeName"></PEDCForm>
						</el-tab-pane>
					</el-tabs>

				</div>
			</el-col>
			<el-col :span="8" style="height: 700;">
				<div class="pedcBg" style="margin-left: 10px">
					<div>PEDCB配置数据</div>
					<el-tabs v-model="activeName1" type="card" @tab-click="handleClick1">
						<el-tab-pane label="ETH-SIG" name="ETH-SIG">
							<PEDCForm :dataForm="dataForm2" :pedcb="activeName1"></PEDCForm>
						</el-tab-pane>
						<el-tab-pane label="ETH-TIAS" name="ETH-TIAS">
							<PEDCForm :dataForm="dataForm2" :pedcb="activeName1"></PEDCForm>
						</el-tab-pane>
					</el-tabs>
				</div>
			</el-col>
			<el-col :span="8" style="height: 700;">
				<div class="pedcBg PEDCInfo" style="margin-left: 10px; position: relative;">
					<el-col :span="8" style="height: 20vh;">
						<div style="display: flex;justify-content: flex-end;position: absolute;">
							<el-form :inline="true" :model="PEDCForm" ref="PEDCForm" :rules="dataRulePEDC" label-width="138px">
								<div style="height: 20px; font-size: 14px; line-height: 20px">
									PEDC A参数
								</div>
								<el-form-item prop="cpu" label="cpu："size="small">
									<el-select v-model="PEDCForm.cpu" :disabled="PEDCStatus" clearable
										style="width:4.8vw; ">
										<el-option v-for="(item, index) in optionsCPU1" :key="index" :label="item.label"
										:value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
								<el-form-item prop="maxCloseTime" label="关门超时报警时间：" size="small">
								<el-input v-model="PEDCForm.maxCloseTime" :readonly="PEDCStatus" oninput="																																																				  .match(/^\d*(\.?\d{0,1})/g)[0] || ''}"
									clearable style="width:4.8vw; ">
									</el-input>
									<span class="danwei"> (2-20s)</span>
								</el-form-item>
								<el-form-item prop="maxOpenTime" label="开门超时报警时间：" size="small">
									<el-input v-model="PEDCForm.maxOpenTime" :readonly="PEDCStatus" oninput="																																																				  .match(/^\d*(\.?\d{0,1})/g)[0] || ''}"
									clearable style="width:4.8vw; ">
									</el-input>
									<span class="danwei"> (2-20s)</span>
								</el-form-item>
							</el-form>
						</div>
					</el-col>
					<el-col :span="8" style="height: 20vh;">
					</el-col>
					<el-col :span="8" style="height: 20vh;position: relative;">
						<div style="margin-top: 60px;">
							<el-row class="bg4">
								<el-button class="baseInfoBtn1" type="primary" @click="readPEDCA" size="small">读PEDC A</el-button>
							</el-row>
							<el-row class="bg4">
								<el-button class="baseInfoBtn2" type="primary" @click="writePEDCA" size="small">写PEDC A</el-button>
							</el-row>
						</div>
					</el-col>
				</div>
				<div class="pedcBg PEDCInfo" style="margin-left: 10px; position: relative;margin-top: 5px;">
					<el-col :span="8" style="height: 20vh;">
						<div style="display: flex;justify-content: flex-end;position: absolute;">
							<el-form :inline="true" :model="PEDCForm" ref="PEDCForm" :rules="dataRulePEDC" label-width="138px">
								<div style="height: 20px; font-size: 14px; line-height: 20px">
									PEDC B参数
								</div>
								<el-form-item prop="cpu" label="cpu："size="small">
									<el-select v-model="PEDCForm.cpua" :disabled="PEDCStatus" clearable
										style="width:4.8vw; ">
										<el-option v-for="(item, index) in optionsCPU1" :key="index" :label="item.label"
										:value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
								<el-form-item prop="maxCloseTime" label="关门超时报警时间："size="small">
								<el-input v-model="PEDCForm.maxCloseTimea" :readonly="PEDCStatus" oninput="																																																				  .match(/^\d*(\.?\d{0,1})/g)[0] || ''}"
									clearable style="width:4.8vw; ">
									</el-input>
									<span class="danwei"> (2-20s)</span>
								</el-form-item>
								<el-form-item prop="maxOpenTime" label="开门超时报警时间："size="small">
									<el-input v-model="PEDCForm.maxOpenTimea" :readonly="PEDCStatus" oninput="																																																				  .match(/^\d*(\.?\d{0,1})/g)[0] || ''}"
									clearable style="width:4.8vw; ">
									</el-input>
									<span class="danwei"> (2-20s)</span>
								</el-form-item>
							</el-form>
						</div>
					</el-col>
					<el-col :span="8" style="height: 20vh;">
					</el-col>
					<el-col :span="8" style="height: 20vh;position: relative;">
						<div style="margin-top: 60px;">
							<el-row class="bg4">
								<el-button class="baseInfoBtn1" type="primary" @click="readPEDCB" size="small">读PEDC B</el-button>
							</el-row>
							<el-row class="bg4">
								<el-button class="baseInfoBtn2" type="primary" @click="writePEDCB" size="small">写PEDC B</el-button>
							</el-row>
						</div>
					</el-col>
				</div>
				<div class="pedcBg PEDCInfo" style="margin-left: 10px; position: relative;margin-top: 5px;">
					<el-row :span="12">
						<el-form :inline="true" :model="PEDCForm" ref="PEDCForm">
							<div style="height: 30px; font-size: 14px; line-height: 30px;">
								PEDCA版本号
							</div>
							<div class="veresionDiv">
								<div class="flexc">
									<el-form-item prop="cpu" label="cpu0版本号：">
										<span class="version">{{pedca0Version}}</span>
										<el-button class="baseInfoBtn1" size="small" type="primary"
											@click="readPEDCA0Version">读cpu0</el-button>
									</el-form-item>
									<el-form-item prop="cpu" label="cpu1版本号：">
										<span class="version">{{pedca1Version}}</span>
										<el-button class="baseInfoBtn1" size="small" type="primary"
											@click="readPEDCA1Version">读cpu1</el-button>
									</el-form-item>
								</div>
							</div>
							<div style="height: 30px; font-size: 14px; line-height: 30px;">
								PEDCB版本号
							</div>
							<div class="veresionDiv">
								<div class="flexc">
									<el-form-item class="width-70" prop="cpu" label="cpu0版本号：">
										<span class="version">{{pedcb0Version}}</span>
										<el-button class="baseInfoBtn1" size="small" type="primary"
											@click="readPEDCB0Version">读cpu0</el-button>
									</el-form-item>
									<el-form-item class="width-70" prop="cpu" label="cpu1版本号：">
										<span class="version">{{pedcb1Version}}</span>
										<el-button class="baseInfoBtn1" size="small" type="primary"
											@click="readPEDCB1Version">读cpu1</el-button>
									</el-form-item>
								</div>
							</div>
						</el-form>
					</el-row>
				</div>
			</el-col>
		</el-row>
		<!--<el-row class="bg2 bg3">
			<el-col :span="24">
				<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
					<h3 class="baseHeader" style="text-align: left;">
						PEDC故障信息
					</h3>
				</div>
				<el-row>
					<el-col :span="3" v-if="downTimes !== ''" style="padding-left: 10px;">宕机次数：{{ downTimes }}</el-col>
					<el-col :span="3" v-if="periodNum !== ''" style="padding-left: 10px;">周期号：{{ periodNum }}</el-col>
					<el-col :span="3" v-if="log !== ''" style="padding-left: 10px;">日志：{{ log}}</el-col>
				</el-row>
			</el-col>
		</el-row> -->
		<el-row class="bg2 bg3">
			<el-col :span="24">
				<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
					<h3 class="baseHeader" style="text-align: left;">
						PEDC固件文件
						<!-- <span v-if="version !== ''" style="padding-left: 10px;">当前版本号为：{{ version }}</span> -->
						<!-- <span v-if="pedcTemperature !== ''" style="padding-left: 10px;">板卡温度：{{ pedcTemperature }} ℃</span>
						<span v-if="platformDownCode !== ''" style="padding-left: 10px;">平台信息：{{ platformDownCode
						}}</span>
						<span v-if="applicationDownCode !== ''" style="padding-left: 10px;">应用信息：{{ applicationDownCode
						}}</span> -->
					</h3>
					<div>
						<el-upload :data="paramsData" :headers="headers" :action="pedcUrl" :on-success="handleSuccess"
							class="upload-demo" :show-file-list="false" style="text-align: left;">
							<el-button type="primary">
								上传固件
							</el-button>
						</el-upload>
						<!-- <el-button class="btn8" type="primary" @click="batchPEDC">批量升级PEDC</el-button> -->
					</div>
				</div>
				<div>
					<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;">
						<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
						<el-table-column type="index" label="序号" header-align="center" align="center" width="50">
						</el-table-column>
						<el-table-column prop="name" label="PEDC固件名称" header-align="center" align="center">
						</el-table-column>
						<el-table-column prop="packagePath" label="PEDC固件路径" header-align="center" align="center">
						</el-table-column>
						<el-table-column prop="createDate" label="上传时间" header-align="center" align="center"
							width="180"></el-table-column>
						<!-- <el-table-column prop="sysUserName" label="登记人" header-align="center" align="center">
						</el-table-column> -->
						<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center"
							width="300">
							<template slot-scope="scope">
								<!-- <el-button type="success" round size="mini" @click="addOrUpdateHandle(scope.row.doorId,true)">查看
								</el-button> -->
								<div style="display: flex;justify-content: space-around;padding: 0 20px;">
									<el-button type="primary" round size="mini" @click="upgrade(scope.row.id, false)">
										升级固件</el-button>


									<!-- <el-button type="danger" round size="mini" @click="deleteHandlePEDC(scope.row.id)">
										{{ $t('delete') }}
									</el-button> -->
								</div>


							</template>
						</el-table-column>
					</el-table>
					<!-- <el-pagination background :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit"
						:total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
						@current-change="pageCurrentChangeHandle">
					</el-pagination> -->
					<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList">
					</add-or-update> -->
					<pedcUpgtade v-if="pedcUpgtadeVisible" ref="pedcUpgtade"></pedcUpgtade>
				</div>
			</el-col>
		</el-row>
		<div class="tipContent" v-if="tipStatus">
			<div class="tipsTxt">
				<div class="merquee">
					<span class="merquee-txt">{{ msg }}</span>
				</div>
				<!-- <marquee :val="msg"></marquee> -->
			</div>
		</div>
	</div>
</template>

<script>
	import debounce from 'lodash/debounce'
	import AddOrUpdate from './PEDCSetting-add-or-update.vue'
	import pedcUpgtade from './pedcUpgrade.vue'
	import Cookies from 'js-cookie'
	import PEDCForm from './PEDCForm'
	export default {
		components: {
			AddOrUpdate,
			pedcUpgtade,
			PEDCForm
		},
		inject: ["reload"],
		data() {
			return {
				dataForm1: {},
				dataForm2: {},
				options: [{
						value: 0,
						label: 'PEDCA'
					},
					{
						value: 1,
						label: 'PEDCB'
					}
				],
				optionsCPU: [{
						value: "cpu0",
						label: 'ETH-SIG'
					},
					{
						value: "cpu1",
						label: 'ETH-TIAS'
					}
				],
				optionsCPU1: [{
						value: 'cpu0',
						label: '配置0'
					},
					{
						value: 'cpu1',
						label: '配置1'
					}
				],
				PEDCForm: {
					id: '',
					cpu: '', //cpu选项
					maxCloseTime: "", //最大关门时间
					maxOpenTime: '', //最大开门时间
					testCloseConTime: "2", //测试关门持续时间
					testOpenConTime: '2', //测试开门持续时间
					endianAlarmTimeSetting: '2', //端门报警时间设定
				},
				PEDCStatus: true,
				pedcUpgtadeVisible: false,
				tipStatus: false,
				msg: '',
				downTimes: '',
				periodNum: '',
				log: '',

				headers: {
					'Authorization': Cookies.get('token')
				},
				pedcUrl: window.SITE_CONFIG['apiURL'] + '/psc/packagemanage/uploader',
				paramsData: {
					type: 'pedc'
				},
				dataList: [],
				dataListLoading: false,
				activeName: 'ETH-SIG',
				activeName1: 'ETH-SIG',
				pedcA0: '',
				pedcA1: '',
				pedcB0: '',
				pedcB1: '',
				pedca0Version: '',
				pedca1Version: '',
				pedcb0Version: '',
				pedcb1Version: '',
			}
		},
		computed: {
			dataRulePEDC() {
				return {
					cpu: [{
						required: true,
						message: 'cpu不能为空',
						trigger: 'blur'
					}],
				}
			}
		},
		activated() {
			this.activeName = 'ETH-SIG'
			this.activeName1 = 'ETH-SIG'
			this.init()
			this.getDCUpackageList()
			// this.getPEDC()
		},
		beforeDestroy() {
			window.clearTimeout()
		},
		mounted() {
			window.addEventListener('onmessageWS', this.getSocketData)
		},
		destroyed() {
			window.removeEventListener('onmessageWS', this.getSocketData)
		},
		methods: {
			handleSuccess(res, file, fileList) {
				if (res.code == 0) {
					this.$message({
						message: '上传成功',
						type: 'success',
						duration: 500,
						onClose: () => {
							this.getDCUpackageList()
						}
					})
				}
			},
			getSocketData(res) {
				if (res.detail.data) {
					this.handleMsg()
				}
			},
			handleClick(val) {
				if (this.activeName == 'ETH-TIAS') {
					this.dataForm1 = {
						...this.pedcA1
					}
				} else {
					this.dataForm1 = {
						...this.pedcA0
					}
				}
			},
			handleClick1(val) {
				if (this.activeName1 == 'ETH-TIAS') {
					this.dataForm2 = {
						...this.pedcB1
					}
				} else {
					this.dataForm2 = {
						...this.pedcB0
					}
				}
			},
			init() {
				setTimeout(() => {
					this.handleMsg() //获取心跳
				}, 200)
				this.$http.get('/psc/cmd/readConf').then(res => {
					if (res.data.code == 0) {
						res.data.data.forEach(item => {
							if (item.cpu == 0 && item.pedc == 0) {
								this.pedcA0 = item
								this.dataForm1 = item;
							} else if (item.cpu == 1 && item.pedc == 0) {
								this.pedcA1 = item
							} else if (item.cpu == 0 && item.pedc == 1) {
								this.pedcB0 = item
								this.dataForm2 = item
							} else if (item.cpu == 1 && item.pedc == 1) {
								this.pedcB1 = item
							}
						})
					}

				})
				this.PEDCForm.cpu = 'cpu0'
				//this.getPEDC()
			},
			readPEDCA0Version: debounce(function() {
				this.$http.get('/psc/cmd/readVersion', {
					params: {
						pedc: '0',
						cpu: '0'
					}
				}).then(res => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg)
					}
					this.pedca0Version = res.data.data
				})
			}, 100),
			readPEDCA1Version: debounce(function() {
				this.$http.get('/psc/cmd/readVersion', {
					params: {
						pedc: '0',
						cpu: '1'
					}
				}).then(res => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg)
					}
					this.pedca1Version = res.data.data
				})
			}, 100),
			readPEDCB0Version() {
				this.$http.get('/psc/cmd/readVersion', {
					params: {
						pedc: '1',
						cpu: '0'
					}
				}).then(res => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg)
					}
					this.pedcb0Version = res.data.data
				})
			},
			readPEDCB1Version() {
				this.$http.get('/psc/cmd/readVersion', {
					params: {
						pedc: '1',
						cpu: '1'
					}
				}).then(res => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg)
					}
					this.pedcb1Version = res.data.data
				})
			},
			//接收websocket数据
			handleMsg() {
				this.$globalWebSocket.ws.send("psc");
				this.$globalWebSocket.ws.onmessage = this.getMessage
			},
			//获取websocket数据
			getMessage(e) {
				var message = JSON.parse(e.data)
				if (message.taskStatus == 3) {
					//都断开A B 同时宕机
					this.tipStatus = true
					this.msg = 'PEDC命令断开,正在重新连接'
				} else {
					//正常的
					this.tipStatus = false
				}
				//pedc故障存在故障
				if (message.hbFaultFrame) {
					this.downTimes = message.hbFaultFrame.downTimes
					this.periodNum = message.hbFaultFrame.periodNum;
					this.log = message.hbFaultFrame.log;
				}
			},
			//读PEDCA
			readPEDCA() {
				this.getPEDCA()
			},
			//写PEDCA
			writePEDCA() {
				this.PEDCStatus = false

				if ((this.PEDCForm.maxCloseTime >= 2 && this.PEDCForm.maxCloseTime <= 20) && (this.PEDCForm.maxOpenTime >=
						2 && this.PEDCForm.maxOpenTime <= 20) &&
					(this.PEDCForm.testCloseConTime >= 2 && this.PEDCForm.testCloseConTime <= 300) && (this.PEDCForm
						.testOpenConTime >= 2 && this.PEDCForm.testOpenConTime <= 300) &&
					(this.PEDCForm.endianAlarmTimeSetting >= 2 && this.PEDCForm.endianAlarmTimeSetting <= 300)) {
					this.$refs['PEDCForm'].validate((valid) => {
						if (!valid) {
							return false
						}
						var obj = {
							...this.PEDCForm
						}
						this.$http[!this.PEDCForm.id ? 'post' : 'put']('/psc/pedcparams/write', obj).then(res => {
							if (res.data.code !== 0) {
								return this.$message.error(res.msg)
							}
							this.$message({
								message: '写入参数成功',
								type: 'success',
								duration: 1500,
							})
						})
					})
				} else {
					this.$message({
						message: '请输入正确参数',
						type: 'error',
						duration: 1500,
					})
				}
			},
			//读PEDCB
			readPEDCB() {
				this.getPEDCB()
			},
			//写PEDCB
			writePEDCB() {
				this.PEDCStatus = false

				if ((this.PEDCForm.maxCloseTime >= 2 && this.PEDCForm.maxCloseTime <= 20) && (this.PEDCForm.maxOpenTime >=
						2 && this.PEDCForm.maxOpenTime <= 20) &&
					(this.PEDCForm.testCloseConTime >= 2 && this.PEDCForm.testCloseConTime <= 300) && (this.PEDCForm
						.testOpenConTime >= 2 && this.PEDCForm.testOpenConTime <= 300) &&
					(this.PEDCForm.endianAlarmTimeSetting >= 2 && this.PEDCForm.endianAlarmTimeSetting <= 300)) {
					this.$refs['PEDCForm'].validate((valid) => {
						if (!valid) {
							return false
						}
						var obj = {
							...this.PEDCForm
						}
						this.$http[!this.PEDCForm.id ? 'post' : 'put']('/psc/pedcparams/write', obj).then(res => {
							if (res.data.code !== 0) {
								return this.$message.error(res.msg)
							}
							this.$message({
								message: '写入参数成功',
								type: 'success',
								duration: 1500,
							})
						})
					})
				} else {
					this.$message({
						message: '请输入正确参数',
						type: 'error',
						duration: 1500,
					})
				}
			},
			getPEDCA() {
				this.$refs['PEDCForm'].validate((valid) => {
					if (!valid) {
						return false
					}
					var obj = {
						cpu: this.PEDCForm.cpu
					}
					this.$http.post('/psc/pedcparams/read', obj).then(res => {
						if (res.data.code == 0) {
							this.PEDCForm.maxCloseTime = res.data.data.maxCloseTime
							this.PEDCForm.maxOpenTime = res.data.data.maxOpenTime
							this.PEDCForm.testCloseConTime = res.data.data.testCloseConTime
							this.PEDCForm.testOpenConTime = res.data.data.testOpenConTime
							this.PEDCForm.endianAlarmTimeSetting = res.data.data.endianAlarmTimeSetting
							this.PEDCStatus = false
							this.$message({
								message: '读取参数成功',
								type: 'success',
								duration: 1500,
								onClose: () => {}
							})
						} else {
							this.$message({
								message: '读取参数失败',
								type: 'error',
								duration: 1500,
								onClose: () => {}
							})
						}
					})
				})
			},
			getPEDCB() {
				this.$refs['PEDCForm'].validate((valid) => {
					if (!valid) {
						return false
					}
					var obj = {
						cpu: this.PEDCForm.cpu
					}
					this.$http.post('/psc/pedcparams/read', obj).then(res => {
						if (res.data.code == 0) {
							this.PEDCForm.maxCloseTime = res.data.data.maxCloseTime
							this.PEDCForm.maxOpenTime = res.data.data.maxOpenTime
							this.PEDCForm.testCloseConTime = res.data.data.testCloseConTime
							this.PEDCForm.testOpenConTime = res.data.data.testOpenConTime
							this.PEDCForm.endianAlarmTimeSetting = res.data.data.endianAlarmTimeSetting
							this.PEDCStatus = false
							this.$message({
								message: '读取参数成功',
								type: 'success',
								duration: 1500,
								onClose: () => {}
							})
						} else {
							this.$message({
								message: '读取参数失败',
								type: 'error',
								duration: 1500,
								onClose: () => {}
							})
						}
					})
				})
			},
			//升级PEDC
			upgrade(id, status) {
				this.pedcUpgtadeVisible = true
				this.$nextTick(() => {
					this.$refs.pedcUpgtade.init(id, status)
				})
			},
			//删除DCU的升级包
			deleteHandlePEDC(id) {
				this.$confirm(this.$t('prompt.info', {
					'handle': this.$t('delete')
				}), this.$t('prompt.title'), {
					confirmButtonText: this.$t('confirm'),
					cancelButtonText: this.$t('cancel'),
					type: 'warning'
				}).then(() => {
					var obj = {
						id: id,
						isDel: 1
					}
					this.$http.put(`/psc/packagemanage`, obj).then(res => {
						if (res.data.code !== 0) {
							return this.$message.error(res.msg)
						}
						this.$message({
							message: this.$t('prompt.success'),
							type: 'success',
							duration: 500,
							onClose: () => {
								this.getDCUpackageList()
							}
						})
					})
				})
			},
			getDCUpackageList() {
				this.dataListLoading = true
				this.dataList = []
				this.$http.get('/psc/packagemanage/pedc', {
					// params: {
					// 	DCU: this.dataForm.DCU,
					// 	stationSide: this.dataForm.stationSide,
					// 	openClose: '',
					// 	dtype: 'PEDC',
					// 	isDel: 0,
					// }
				}).then(({
					data: res
				}) => {
					this.dataListLoading = false
					console.log(res, 'code数据')
					if (res.code !== 0) {
						this.dataList = []
						this.total = 0
						return this.$message.error(res.msg)
					}
					this.dataList.push(res.data)
					// this.dataList = res.data.list
					// this.total = res.data.total
				})
			},
		}
	}
</script>

<style scoped>
	.veresionDiv {
		display: flex;
		justify-content: space-between;
	}

	.flexc {
		display: flex;
		flex-direction: column;
	}

	.pedcBg {
		min-height: 180px;
		background-color: #fff;
		padding: 1.5vh 1.1vw;
	}

	/* .pedcBg>>>.el-form-item {
		margin-bottom: 6px !important;
	} */

	.bg2 {
		background-color: #fff;
		border-radius: 10px;
		padding: 1.1vh 1.5vw;
		margin-top: 10px;
		height: 38.1vh;
	}

	.bg3 {
		height: auto !important;
	}
	.bg4 {
		background-color: #fff;
		border-radius: 10px;
		margin-top: 30px;
		height: 3vh;
	}

	.version {
		display: inline-block;
		float: left;
		height: 40px;
		width: 6vw;
		margin-right: 15px;
	}

	.baseInfoBtnRight>>>.baseInfoBtn1,
	.PEDCBtn>>>.baseInfoBtn1,
	.PEDCInfo>>>.baseInfoBtn1 {
		background: rgba(42, 130, 228, 1) !important;
		border-color: rgba(42, 130, 228, 1) !important;
		clear: both;
	}

	.baseInfoBtnRight>>>.baseInfoBtn1:focus,
	.baseInfoBtnRight>>>.baseInfoBtn1:hover,
	.PEDCBtn>>>.baseInfoBtn1:focus,
	.PEDCBtn>>>.baseInfoBtn1:hover,
	.PEDCInfo>>>.baseInfoBtn1:focus,
	.PEDCInfo>>>.baseInfoBtn1:hover {
		background: rgba(42, 130, 228, 1) !important;
		border-color: rgba(42, 130, 228, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn2,
	.PEDCBtn>>>.baseInfoBtn2,
	.PEDCInfo>>>.baseInfoBtn2 {
		background: rgba(255, 87, 51, 1) !important;
		border-color: rgba(255, 87, 51, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn2:focus,
	.baseInfoBtnRight>>>.baseInfoBtn2:hover,
	.PEDCBtn>>>.baseInfoBtn2:focus,
	.PEDCBtn>>>.baseInfoBtn2:hover,
	.PEDCInfo>>>.baseInfoBtn2:focus,
	.PEDCInfo>>>.baseInfoBtn2:hover {
		background: rgba(255, 87, 51, 1) !important;
		border-color: rgba(255, 87, 51, 1) !important;
	}

	.tipContent {
		position: fixed;
		top: 0px;
		height: 50px;
		line-height: 50px;
		z-index: 999999;
		width: 50%;
		margin-left: 20%;
		text-align: center;
	}

	.tipsTxt {
		color: red;
		font-weight: 600;
		font-size: 20px;
		width: 250px;
		margin: 0 auto;
	}

	.tipsTxt>>>.marquee-wrap,
	.tipsTxt>>>.scroll {
		height: 50px;
	}

	.tipsTxt>>>.marquee,
	.tipsTxt>>>.copy {
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}

	.tipsTxt>>>.getWidth {
		margin: 0 !important;
	}

	/* 文字滚动 */
	.merquee {
		height: 50px;
		line-height: 50px;
		box-sizing: border-box;
		word-break: break-all;
		white-space: nowrap;
		overflow: hidden;
	}

	.merquee-txt {
		display: inline-block;
		padding-left: 100%;
		/* 从右至左开始滚动 */
		animation: marqueeTransform 16s linear infinite;
	}

	@keyframes marqueeTransform {
		0% {
			transform: translate(0, 0);
		}

		100% {
			transform: translate(-100%, 0);
		}
	}
</style>